<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252" %>
<!--#include file="common/connStr-s.asp" -->
<%

function Rename() {
    var id = Request.Form("id");
    if (id == "" || id == 'undefined') {
        return;
    }
    var comObj = Server.CreateObject('ADODB.Command');
    
    var cmdStr = ""
    var title = Request.Form("name");
    comObj.parameters.append(comObj.createParameter("@Title", 202, 0x0001, 150, title));
    comObj.parameters.append(comObj.createParameter("@PhotoID", 3, 0x0001, 8, id));
    cmdStr = "UPDATE dbo.PhotoAlbums SET AlbumName=? WHERE AlbumID = ?"
    
    comObj.CommandText = cmdStr;
    comObj.ActiveConnection = connStr;
    comObj.Execute();
    comObj.ActiveConnection.Close();
    delete comObj;
}
var action = Request.Form("action")
if (action == 1) {
    Rename();
}

%>